/**
 * FileName: DepartmentController
 * Author:   P
 * Date:     2021/3/16 19:59
 * Description:
 */
package com.hospital.nurse.controller;

import com.hospital.nurse.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

//科室
@RestController
@RequestMapping("/department")
@CrossOrigin
public class DepartmentController {
    @Autowired
    private DepartmentService departmentService;


    @RequestMapping("/getAllDepartment")
    public Map<String,Object> getAllDepartment(){
        Map<String, Object> map = new HashMap<>();
        map.put("departments",departmentService.list());
        return map;
    }



}
